<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="applicable-device" content="mobile"/>
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <!--<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">-->
    <meta name="format-detection" content="telephone=no"/>

    <link rel="stylesheet" href="css/all.css"/>
    <script src="lib/flexible.js"></script>
    <link rel="stylesheet" href="css/validform.css" />
    <script src="lib/jquery-1.9.1.min.js"></script>
    <!--<script src="lib/Validform_v5.3.2.js"></script>-->
    <script src="lib/jquery.cookie.js"></script>
    <script src="js/hgNews.min.js"></script>

</head>
<body>
<!-- header -->
    <header class="header2">
        <a href="JavaScript:history.go(-1)" class="return"><img src="img/234d_03.png" /></a>
        <span class="word">登&nbsp;&nbsp;陆</span>
    </header>
<!-- /header -->
<!-- bodyer -->
<div class="placeholder"></div>
<div class="register">
    <div class="p">未注册的手机验证后自动注册</div>
    <form  class="register-form" action="" method="post">
        <div  class="verify-text">
            <input class="tel input" id="mobile" type="number" placeholder="手机号" maxlength="11" datatype="/^13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|18[0-9]{9}$/" errormsg="手机号错误"/>
            <input class="verify-button" id="id-timer" type="button" value="验证码"/>
        </div>
        <div class="verify-text verify-password">
            <input class="heighuang-id input" id="verification_code" type="number" placeholder="验证码" maxlength="m" datatype="/[\w\W]+/" errormsg="验证码错误"/>
        </div>
        <a href="register2.html" class="word">使用黑光通行证账号登录</a>
        <input class="register-button" type="button" value="登 录"/>
    </form>
    <div class="tel-register">
        <a class="tel-a" href=""></a>
    </div>
    <div class="fast-register l-f">
        <div class="fast-word">其他方式登录</div>
        <a class="weixin l-f-g1" href="">
            <img src="img/23232w_03.png" alt="">
            <p>微信登录</p>
        </a>
        <a class="qq l-f-g1" href="">
            <img src="img/23324a_13.png" alt="">
            <p>QQ登录</p>
        </a>
    </div>
</div>
<!-- /bodyer -->
<!--验证码-->
<script src="js/timer.js"></script>
<script>
    $("#id-timer").on("click",function(){
        var tt=hgNews.regExp.phone($("#mobile"));
        if (tt == true){
            timer.call(this,{
                coun:60,
                src:hgNews.api.verificationCode,
                data:"#mobile",
                callback: function (data){
                    if (data.status == 1){
                        $("#mobile").siblings(".Validform_checktip").empty().addClass("Validform_right").removeClass("Validform_wrong");
                        $("#mobile").removeClass("Validform_error");
                        //$.cookie('modal',"tyryry", {expires: 7 , path: '/'});
                        //console.log($.cookie("modal"));

                        $con = data.data.is_login;
                        $("#mobile").attr("login",data.data.is_login);
                    }else{
                        $("#mobile").siblings(".Validform_checktip").text("手机号错误").addClass("Validform_wrong").removeClass("Validform_right");
                        $("#mobile").addClass("Validform_error");
                    }
                }
            });
        }else {
            $(this).siblings(".Validform_checktip").text("手机号错误").addClass("Validform_wrong").removeClass("Validform_right");
            $(this).siblings("#mobile").addClass("Validform_error");
        }
    });
</script>
<!--注册-->
<script>
    hgNews.validForm({
        submit:$(".register-button"),
        input:[
            $("#mobile"),
            $("#verification_code")
        ],
        url1:hgNews.api.register1,
        url2:hgNews.api.register2,
        cont:$("#mobile")
    });
</script>
<!--登陆-->
<script>

</script>
</body>
</html>
